import request from "@/utils/request";
var baseUrl = '/admin/userAccount/'

export function findAllUsers(userQuery) {
  return request({
    url: baseUrl+'findAllUsers',
    method: 'post',
    data: userQuery
  })
}

export function changeUserState(id) {
  return request({
    url: baseUrl+'changeUser/state',
    method: 'post',
    params: {id}
  })
}

export function findAllUsersAuthor(users) {
  return request({
    url: baseUrl+'author/findAllUsers',
    method: 'post',
    data: users
  })
}

export function ban(userId, type) {
  return request({
    url: baseUrl+'/author/ban',
    method: 'post',
    params: {userId, type}
  })
}

export function unseal(userId, type) {
  return request({
    url: baseUrl+'/author/unseal',
    method: 'post',
    params: {userId, type}
  })
}

export function addUserRole(data) {
  return request({
    url: baseUrl+'/author/addrole',
    method: 'post',
    data
  })
}

